<!DOCTYPE html>
<html lang="zh-cn">
<head>
	<meta charset="utf-8"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<meta content="initial-scale=1.0,minimum-scale=1.0,maxinum-scale=1.0,user-scalable=no,width=device-width" name="viewport">
	<title>资讯</title>
	<link rel="stylesheet" href="layui/css/layui.css" media="all">
	<link rel="stylesheet" href="css/mui.min.css">
	<link rel="stylesheet" href="css/style.css">
	<link rel="stylesheet" type="text/css" media="screen and (max-width:767px)" href="css/style.css" />
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/layer/layer.js"></script>
	<script type="text/javascript" src="layui/layui.js"></script>
	<script type="text/javascript" src="js/mui.min.js"></script>
</head>
<body>
	<div class="container">
		<div>
			<div class="body">
				<div class="bigtitle" id="bigtitle">
					
				</div><br/>

				<div style="font-size: 14px; font-family: 微软雅黑;">
					<font style="color:#607fa6;" id="source"></font>
					<font style="color:#808080;" id="time"></font>	
				</div>

				<!-- <div class="detail-body">
					<div class="detail-content bigimg" id="bigimg">
						<img src="imgs/bac.jpg">
					</div>
				</div> -->

				<div class="blank"></div>
				<div class="content-body" id="content-body" >
					
				</div>
			</div>
		</div>
	</div>
</body>
</html>
<script type="text/javascript">
	var artId = null;
	$(document).ready(function() {   
		var url = location.search; //获取url中"?"符后的字串
		var i = url.indexOf("=")+1;
		artId=url.substring(i,url.length);
		
		$.ajax({
						url : "http://192.168.1.125:80/shiro/beforeShow/selectArticlesId",
						dataType:"json",
						type:"post",
						data :{
							artId:artId
						},
						contentType: "application/x-www-form-urlencoded; charset=utf-8",
						success : function(data) {
							if(data.status==0){
								// html="<img class=\"imgId\" src=\"http://192.168.1.125/shiro///imgs/"+data.msg.artUrl+"\">";
								$("#bigtitle").text(data.msg.artTitle); 
								//$("#bigimg").html(html);
								$("#content-body").html(data.msg.artContent);
								$("#source").text(data.msg.artSource); 
								$("#time").text(data.msg.artTime); 
								//修改内容中img图片宽度
								var list=document.getElementById("content-body").getElementsByTagName("img");
									for (var i = 0; i < list.length; i++) {
										list[i].style.width='317'+'px';
									}
								
							}else{
								layer.msg("里面没有内容哦！");
							}
						}
					})
		
		
		
});


</script>